<%@ page import="java.io.File" %>
<%@ page import="java.text.SimpleDateFormat" %>
<%@ page import="java.text.DateFormat" %>
<%@ page import="java.util.Date" %>
<%--
  Created by IntelliJ IDEA.
  User: ztc
  Date: 16-1-23
  Time: 下午5:23
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" language="java" %>
<html>
<head>
  <title>Shadows测试账号</title>
  <link href="css/min.css" rel="stylesheet">
  <link href="css/login.css" rel="stylesheet">
  <script src="js/jquery.js"></script>
  <script src="js/min.js"></script>
</head>
<body>
<table class="table">
  <tr><td align="center" colspan="2"><h3><b>定时更新节点</b></h3></td></tr>
  <tr align="center"><td><b>节点</b></td><td><b>更新时间</b></td></tr>
  <%

    File SS=new File(request.getSession().getServletContext().getRealPath("/SS"));
    File[] files=SS.listFiles();
    if(files!=null&&files.length!=0) {
      for (File file : files) {
        out.println("<tr align=\"center\"><td><a href=\"SS/"+file.getName()+"\">");
        out.println(file.getName());
        out.println("</td><td>");
        SimpleDateFormat sdf= new SimpleDateFormat("MM/dd/yyyy HH:mm:ss");
        Date dt = new Date(file.lastModified());
        out.println(sdf.format(dt));
        out.println("</a></td></tr>");
      }
    }else{
      out.println("<tr align=\"center\"><td colspan=\"2\">");
      out.println("暂时无可用的账号,最晚30分钟后更新！");
      out.println("</td></tr>");
    }
  %>
  <tr><td align="center" colspan="2"><a href="http://www.shadowsocksgo.com/ssclient/">shadowsocks客户端</a></td></tr>
  <tr><td align="center" colspan="2"><a href="https://github.com/shadowsocks/shadowsocks-gui">shadowsocksGUI开源项目</a></td></tr>
</table>
</body>
</html>
